{extend name="web/public/base" /}
{block name="header"}
<style>
    textarea{
        height:100px!important;
    }
</style>
{/block}
{block name="main"}
<section class="scrollable padder">
    <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
        <li><a><i class="fa fa-home"></i> 首页</a></li>
        <li class="active">系统设置</li>
        <li class="active">{$meta_title}</li>
    </ul>
    <div style="margin-bottom: 10px;">
        {foreach name='type' key='ko' item='vo'}
        <a {if condition="$ko eq $id" }class="btn btn-primary" {else/}class="btn btn-info"{/if}
        href="{:url('group',array('id'=>$ko))}">{$vo}设置</a>
        {/foreach}
    </div>

    <div class="row">
        <div class="col-sm-12">
            <section class="panel panel-default">
                <header class="panel-heading font-bold">{$meta_title}</header>
                <div class="panel-body">
                    <form action="" method="post">
                        <div class="row col-md-10">
                            {foreach name='_list' item='vo'}
                            <label>{$vo.title}</label>
                            {switch name='vo.type'}
                            {case value='0|1'}
                            <div class="form-group col-sm-12">
                                <input type="text" name="{$vo.name}" class="form-control" value="{$vo.value}">
                            </div>
                            {/case}
                            {case value='2|3'}
                            <div class="form-group col-sm-12">
                                <textarea type="text" name="{$vo.name}" class="form-control" >{$vo.value}</textarea>
                            </div>
                            {/case}
                            {case value='4'}
                            <div class="form-group col-sm-12">
                                <select class="form-control" name="{$vo.name}">
                                    {foreach name='vo.extra' key='k' item='v'}
                                    <option value="{$k}" {if condition="$k eq $vo['value']" }selected="selected" {/if}>{$v}</option>
                                    {/foreach}
                                </select>
                            </div>
                            {/case}
                            {case value='5'}
                            <div class="form-group col-sm-12">
                                <textarea type="text" name="{$vo.name}" class="form-control">{$vo.title}</textarea>
                            </div>
                            {/case}
                            {case value='6'}
                            <div class="form-group col-sm-12">
                                <input type="password" name="{$vo.name}" class="form-control" value="{$vo.title}">
                            </div>
                            {/case}
                            {case value='7'}
                            <div class="form-group col-sm-12">
                                <img src="{$vo.value|get_cover='path'}" style="max-width: 300px;"/>
                            </div>
                            {/case}
                            {/switch}
                            {/foreach}
                            <footer class="panel-footer text-right bg-light lter col-sm-12">
                                <button type="submit" class="btn btn-success btn-s-xs">提 交</button>
                            </footer>
                        </div>
                    </form>
                </div>
            </section>
        </div>
    </div>
</section>
{/block}
{block name="footer"}
<script type="text/javascript">
</script>
{/block}
